package plantshop.controller.moves;

import java.io.Serializable;

import plantshop.model.Creature;
import plantshop.model.Game;

public class DeleteCreatureMove extends TimeMove implements Serializable{
	private static final long serialVersionUID = 1770493594892255138L;
	int type;
	public DeleteCreatureMove(int t){
		this.type = t;
	}
	
	
	@Override
	public void execute(Game game) {
		for(Creature c: game.getCreatures()){
			if(c.getType()==type){
				game.deleteCreature(c);
				return;
			}
		}
	}

}
